Talk:BackToTopButton
Not working for me See w:User:Fandyllic/global.js. I'm testing this on an old FF 3.6.27, so maybe that's the problem, but other JS works. -- Fandyllic (talk · ) 12 Mar 2012 1:11 PM Pacific :Confirmed not working on FF.— subtank (7alk) 22:03, March 12, 2012 (UTC) ::Yep I'm looking into it right now. Subtank, on FF 10, if you import the script in your global.js does it work then or is it still not loading? Because that works for me. --[[User:Noemon|''Noemon]][[User talk:Noemon| *'talk'*'']] 22:34, March 12, 2012 (UTC) ::Oh lookie, it works... maybe give the servers some time to load it up properly? It's always the case when it comes to making "something" to load in Wikia. :P ::Check it again in three working days; if it doesn't load up (that is, without having the user to put it in their global.js), then there's something wrong.. — subtank (7alk) 00:31, March 13, 2012 (UTC) :::Ok I think I got it. It seems that the problem was with the definition order of the functions. For some reason, when the script is local and not imported, Firefox's javascript engine did not like the fact that the functions were defined after the call to them was made. Chrome's engine seems to not care about that. On the tests I did it now works as it should when the script is local (as well as when it's imported), on both browsers. :::Fandyllic, please, do tell me if it works on FF 3.6 now. If it does it definitely was an issue with the javascript engine. --[[User:Noemon|''Noemon]][[User talk:Noemon| *'talk'*'']] 00:56, March 13, 2012 (UTC) ::::Loaded properly on FF (v10). :) — subtank (7alk) 01:21, March 13, 2012 (UTC) :::::Working now! Adding back my other JS. Hopefully it won't conflict. -- Fandyllic (talk · ) 12 Mar 2012 6:17 PM Pacific Fade-in/Fade-out I actually don't like the fade in and fade out styles. Can I remove that feature please? -- Sam Wang (talk) 12:21, May 22, 2012 (UTC) :I added a "switch" between simple show/hide and fade in/out. Fading is set by default. :) --[[User:Noemon|''Noemon]][[User talk:Noemon| *'talk'*'']] 18:36, May 26, 2012 (UTC) Teaked version I change the code an bit (lay-out sided). In this code the buttom is changed to an arrow image. White arrow version: Black arrow code: No Longer Working With the recent site wide change to the layout, the BackToTopButton is no longer appearing in the toolbar. --Whistle9 (Talk) 10:44, October 3, 2012 (UTC) : I've given it a kick, hopefully it's ground back into action. Lunarity 11:02, October 3, 2012 (UTC) ::Seems to be working again. I think the appearance of the button needs to be altered though; it is now partway off the toolbar. ::--Whistle9 (Talk) 09:15, October 4, 2012 (UTC) :::I didn't write this, I'm only familiar with how the toolbar works and what changes Wikia made so I knew why it was broken. I'll look in to why it isn't placing the button properly when I don't have anything else that needs doing if no-one else does first; you may want to contact the author directly on their talk page instead. Lunarity 10:16, October 4, 2012 (UTC) Home button This feature is definitely and undeniably useful, but won't the "Home" button on the keyboard replace this, especially for more keyboard-orientated users? I haven't tried this yet, so I offer my sincere apologies if I'm wrong. — SW8573 (Message Wall) 12:25, October 4, 2012 (UTC) :Yes, the "home" button should functionally serve exactly the same purpose as this script. However... the percentage of people who actually know that is very low :P Text Any chance we can get the text to be "Back to top" rather than "Back To Top"? Sorry, the title case just annoyed me. Or possibly "Scroll back to top".--Technobliterator 00:37, January 2, 2016 (UTC) :You can change it in code, text is the last "Back to top" in line 47, looks like the only way is copy the code to your js and change it.--Mark orz (talk) 10:04, April 26, 2016 (UTC) No Longer Scrolls Yesterday I noticed that this script no longer functions properly (conveniently lining up with an update of the script's code). The button now appears no matter how far to the top of the article you are. Also, clicking on the button does nothing. At this point it's just a useless button. DEmersonJMFM 14:09, May 14, 2016 (UTC) :Thanks for the fixes. A minor issue left - there's a piece of border to the right that wasn't there before. DEmersonJMFM 15:24, May 14, 2016 (UTC) ::Where is this at? I'll look into it. Rappy 15:38, May 14, 2016 (UTC) :::To the right of the button. DEmersonJMFM 16:47, May 14, 2016 (UTC) ::::I meant which wiki. I'm not seeing a border. Rappy 16:50, May 14, 2016 (UTC) :::::It's not wiki-specific as I see it on every wiki. It's also not caused by user CSS. I'm using Chrome if that's any help. DEmersonJMFM 19:33, May 14, 2016 (UTC) ::::::Odd. I'm on Chrome too and I am not seeing that. Rappy 21:47, May 14, 2016 (UTC) :::::::I did see it while piggyback you though. Odd that I didn't see it. This should have fixed it. Rappy 21:52, May 14, 2016 (UTC) Confused On Where To Place Code Mentioned In Modernization Section I've placed the line dev:BackToTopButton/code.js but in the rest of the Guide, it doesn't specifically state where to place each type of code for that style to be accepted. So I'm currently confused and obviously at an impasse until the Guide is updated. Currently, the line is omitted at http://warrenwoodhouse.wikia.com/wiki/MediaWiki:ImportJS Warren Woodhouse | Blog | Talk | Videos | Quote: "I can accept failure, everyone fails at something. What I can't accept is not trying." - Quote By: Michael Jordan 16:32, August 18, 2018 (UTC) :Hello, if you would like to give the BackToTopButton a "modern" look, add the this code to the top of your wiki's Common.js page: window.BackToTopModern = true;. While you're at it, you may want to remove importScriptPage('MediaWiki:Translator/Translator.js', 'dev'); and add dev:Translator/Translator.js to the ImportJS page. Once you've edited Common.js, click the "submit for review" button to the right so FANDOM Staff can review it and make it go live. Hope that helps! use the right css property instead of left Since the BackToTopButton should ideally appear on the right hand side of the screen, why does it use left instead of right? I imagine what it would take is removing function modernReposition() { this.css('left', ( mw.util.$content.offset().left + // left: 5% mw.util.$content.width() * 95 / 100 ) + 'px'); } from MediaWiki:BackToTopButton/code.js and adding something like right: 20px; to MediaWiki:BackToTopButton.css but I don't really do anything with JS so I don't know for sure. ~ Forge the Hybrid (wall) 01:24, March 12, 2019 (UTC) :Hey, that's like that because of https://dev.fandom.com/wiki/MediaWiki:BackToTopButton/code.js?diff=93859&oldid=85039, which was done due to the . --Sharkie 03:29, March 12, 2019 (UTC) Customize modern back to top button Hello, Does anyone who knows coding knows how to replace the modern back to top button with an image? Like I want to replace the btt button of this wiki with this image. (Img source:https://www.shonenjump.com/j/sp_neverland/present_2019/). I saw Bendy Wiki managed to customized theirs so I think it might be possible to do the same. 14:54, June 6, 2019 (UTC) :Here (change the size of the button to your needs): #BackToTopBtn div { border-radius: initial; background: url(https://www.shonenjump.com/j/sp_neverland/present_2019/img/btn_top.png) no-repeat !important; background-size: contain !important; width: 100px; height: 100px; } #BackToTopBtn svg { visibility: hidden; } -- [[User:KhangND|'Khang']] (talk) 00:41, June 7, 2019 (UTC) @Khang: Thank you so much for your help! �� Aphrodite (talk) June 7, 2019 (UTC) Solution If you guys need the solution to this, you can see it working on my Wiki. Apparently there is a mistake in the code and I managed to correct it. Add the line shown below to the page MediaWiki:ImportJS. Then after it’s added, save the page and purge it, this makes the code work. dev:BackToTopButton/code.js Then add the code below to the page MediaWiki:Common.js, save the page and then purge the page. You need to purge both pages for the code to take effect. window.BackToTopModern = true; This solves the problem. I think the documentation page for this plugin doesn’t seem to make sense so I sort of worked it out. It works fine on my Wiki and for those wanting to have a look, my Wiki is available at www.warrenwoodhouse.fandom.com I make a lot of cool maps using Google Maps My Maps which feature real life locations from video games, movies, tv shows, etc. Also I have lots of other cool pages too. Enjoy! :D Warren Woodhouse | Blog | Talk | Videos | Quote: "I can accept failure, everyone fails at something. What I can't accept is not trying." - Quote By: Michael Jordan 16:51, June 10, 2019 (UTC)